<template>
	<view class="container">
		<view>
			<desc-wrapper :title="title" :desc="desc"></desc-wrapper>
			<z-card justifyContent="center">
				<view class="card-content-item">
					<view class="w-full h-full flex-1">
						<!-- <view class="input-name-box">
							<input class="input-item" v-model="form.title_zeri" type="text"
								placeholder="请输入关键字" />
						</view> -->
						<text>查询方法:<span style="margin-left: 20rpx;">选择查询时间范围和择事项</span></text>
						<view class=""  style="display: flex;align-items: center;margin-top: 15rpx;">
							<text class="">查询范围:</text>
							<view class="card-content_right flex-row flex-wrap flex-1">
								<uni-data-select class="riqi" style="margin-top: 10rpx; margin-bottom: 15rpx;" :clear="false"
									v-model="form.future" :localdata="time" label='text' value='value' @change="furChange"></uni-data-select>
							</view>
						</view>
						<view class=""  style="display: flex;align-items: center;">
							<text class="">择吉事项:</text>
							<view class="card-content_right flex-row flex-wrap flex-1">
								<uni-data-select class="riqi" style="margin-top: 10rpx; margin-bottom: 15rpx;" :clear="false"
									v-model="form.incident" :localdata="something" label='text' value='value' @change="sthChange"></uni-data-select>
							</view>
						</view>
						
					</view>
				</view>
			</z-card>
			<view class="bottom-btns">
				<view class="start-btn" @click="onClick_1">
					<text class="">立即查询</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '择日查好',
				desc: '测试方法：输入关键字，点击立即查询，并查看结果，请自行体会其中的指示',
				form: {
					future:'',
					incident:''
				},
				time: [{
						value: 0,
						text: '未来7天'
					},
					{
						value: 1,
						text: '未来15天'
					},
					{
						value: 2,
						text: '未来1个月'
					},
					{
						value: 3,
						text: '未来3个月'
					}
				],
				something:[
					{
						value:0,
						text:'迁徙|搬家'
					},
					{
						value:1,
						text:'修造|装修'
					},
					{
						value:2,
						text:'入宅'
					},
					{
						value:3,
						text:'纳采|订婚|结婚'
					},
					{
						value:4,
						text:'嫁娶|领证'
					},
					{
						value:5,
						text:'求嗣|破腹产'
					},
					{
						value:6,
						text:'纳财'
					},
					{
						value:7,
						text:'开市'
					},
					{
						value:8,
						text:'交易'
					},
					{
						value:9,
						text:'置产'
					},
					{
						value:10,
						text:'动土'
					},
					{
						value:11,
						text:'出行'
					},
					{
						value:12,
						text:'安葬'
					},
					{
						value:13,
						text:'祭祀'
					},
					{
						value:14,
						text:'祈福'
					},
					{
						value:15,
						text:'沐浴'
					},
					{
						value:16,
						text:'订盟'
					},
					{
						value:17,
						text:'纳婿'
					},
					{
						value:18,
						text:'修坟'
					},
					{
						value:19,
						text:'破土'
					},
					{
						value:20,
						text:'安葬'
					},
					{
						value:21,
						text:'立碑'
					},
					{
						value:22,
						text:'开生坟'
					},
					{
						value:23,
						text:'合寿木'
					},
					{
						value:24,
						text:'入殓'
					},
					{
						value:25,
						text:'移柩'
					},
					{
						value:26,
						text:'伐木'
					},
					{
						value:27,
						text:'掘井'
					},
					{
						value:28,
						text:'挂匾'
					},
					{
						value:29,
						text:'栽种'
					},
					{
						value:30,
						text:'入学'
					},
					{
						value:31,
						text:'理发'
					},
					{
						value:32,
						text:'会亲友'
					},
					{
						value:33,
						text:'赴任'
					},
					{
						value:34,
						text:'求医'
					},
					{
						value:35,
						text:'治病'
					},
					
				]
				
			};
		},
		methods: {
			furChange(){
				console.log(this.form.future,'这项对应的时间范围')
			},
			sthChange(){
				console.log(this.form.incident,'事件')
			},
			onClick_1() {
				let that = this;
				if (this.form == "") {
					uni.$u.toast("请选择查询条件")
					return
				}
                uni.navigateTo({
					url: `/pages/zeri/detail?formData=${JSON.stringify(that.form)}`
				})
			},
			
			/* 择吉时 */
			getGoodTime(){
				
			},
		},
	};
</script>
<style lang="scss">
	::v-deep .riqi .uni-select{
				width: 300rpx;
		    }
</style>